#include <pthread.h>
#include <stdio.h>

int g_n = 10;

void *thfunc(void *arg)
{
    g_n++;
    printf("in thfunc:g_n=%d\n", g_n);
    return (void *)0;
}

int main()
{
    pthread_t tid;
    int ret;
    pthread_create(&tid, NULL, thfunc, NULL);
    pthread_join(tid, NULL);
    g_n++;
    printf("in main g_n = %d\n", g_n);
    return 0;
}